package com.quanlei.tools;

import org.json.JSONObject;

import android.R;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;

public class JsonListAdapter extends ArrayAdapter<JSONObject> {

	private int resourceId;

	public JsonListAdapter(Context context, int textViewResourceId,
			JSONObject[] objects) {
		super(context, textViewResourceId, objects);
		this.resourceId = textViewResourceId;
	}

//	@Override
//	public View getView(int position, View convertView, ViewGroup parent) {
//		JSONObject jSONObject = getItem(position);
//		LinearLayout userListItem = new LinearLayout(getContext());
//		String inflater = Context.LAYOUT_INFLATER_SERVICE;
//		LayoutInflater vi = (LayoutInflater) getContext().getSystemService(
//				inflater);
//		vi.inflate(resourceId, userListItem, true);
//		TextView tvUsername = (TextView) userListItem
//				.findViewById(R.id.tv_user_list_username);
//		tvUsername.setText(user.getUsername());
//		tvAskedNum.setText(String.valueOf(user.getAskedNum()));
//		tvLastMsg.setText(user.getLastMsg());
//		return userListItem;
//	}

}
